package cn.caplike.demo.repository.design.pattern.flyweight;

/** 可以被共享的对象 */
public class ConcreteFlyweight implements Flyweight {
    private final String intrinsicState;

    public ConcreteFlyweight(String intrinsicState) {
        this.intrinsicState = intrinsicState;
    }

    @Override
    public void operation(String extrinsicState) {
        System.out.println(this.intrinsicState + " - " + extrinsicState + "(" + this.hashCode() + ")");
    }
}
